package main

//oop继承
import "fmt"

type Person struct {
	Name  string
	Email string
	Age   int
}

type Student struct {
	Person
	StudentId int
}

func (p *Person) SayHello() {
	fmt.Printf("[Person,hello][name:%s]", p.Name)
}

func main() {
	p := Person{
		Name:  "lwq",
		Email: "qq.com",
		Age:   18,
	}
	s := Student{
		Person:    p,
		StudentId: 11,
	}
	s.SayHello()
}
